<template>
	<view v-if="!loading" class="no-more-holder__container">
		<image class="no-more-holder__icon" :src="image || asserts.ic_order_empty"/>
		<view class="no-more-holder__title">{{title}}</view>
		<view class="no-more-holder__sub-title">{{subTitle}}</view>
	</view>
</template>

<script>
	export default {
		name:"no-more-holder",
		props: {
			title: {
				type: String,
				default: ""
			},
			image: {
				type: String,
			},
			subTitle: {
				type: String,
				default: ""
			}
		},
		computed: {
			title() {
				return this.title || "暂无数据~"
			},
			subTitle() {
				return this.subTitle || ""
			},
			loading() {
				let pages = getCurrentPages()
				let currentPage = null
				if(pages && pages.length > 0) {
					currentPage = pages[pages.length - 1]
				}
				if(currentPage) {
					return currentPage.$vm.isLoading
				}
				return false
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style>
	.no-more-holder__container {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: center;
	}
	
	.no-more-holder__icon {
		width: 530rpx;
		height: 360rpx;
		margin: 0 auto;
		box-sizing: border-box;
	}
	
	.no-more-holder__title {
		margin-top: 64rpx;
		text-align: center;
		font-size: 32rpx;
		color: #01CBFF;
		font-weight: 400;
	}
	
	.no-more-holder__sub-title {
		margin-top: 8rpx;
		text-align: center;
		font-size: 24rpx;
		/* color: #8391AC; */
		color: #336DEE;
		font-weight: 400;
	}
</style>